feat: add MiniMax as a model provider (default M3)#2717
Open
octo-patch wants to merge 2 commits into
Open
Conversation
Add MiniMax (https://www.minimaxi.com/) as a first-class model provider alongside SiliconFlow, DashScope, and TokenPony. MiniMax offers LLM models (M2.7 with 1M context, M2.5/M2.5-highspeed with 204K context) and the embo-01 embedding model. Backend: - Add MiniMaxModelProvider with model type classification (LLM, embedding, TTS, STT, reranker, VLM) and known context window sizes - Register provider in factory, enum, and base URL constants - Wire into model_management_service for batch create flow Frontend: - Add useMinimaxModelList hook for batch import - Add MiniMax option in ModelAddDialog provider dropdown - Add provider constants (icon, hint, link) and i18n translations (en/zh) Tests: - Add 16 unit tests covering all model types, error handling, context windows, and auth header verification
|
- Add MiniMax-M3 to model context map and set as default - Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed (correct 192K context) - Remove older M2.5/M2.5-highspeed models - Update related unit tests to match the new model list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
Add MiniMax as a first-class model provider in nexent, with MiniMax-M3 as the default LLM.
What is MiniMax?
MiniMax is a leading AI company offering powerful LLM and embedding models:
All models are accessible via an OpenAI-compatible API at
https://api.minimax.io/v1.Changes
Backend (5 files):
backend/services/providers/minimax_provider.py— NewMiniMaxModelProviderwith model type classification (LLM, embedding, TTS, STT, reranker, VLM) and known context window sizes for M3 / M2.7 / M2.7-highspeedbackend/consts/provider.py— AddMINIMAXenum, base URL, and models endpointbackend/services/providers/__init__.py— ExportMiniMaxModelProviderbackend/services/model_provider_service.py— Wire MiniMax into factorybackend/services/model_management_service.py— Add MiniMax base URL for batch createFrontend (5 files):
frontend/hooks/model/useMinimaxModelList.ts— Batch import hook (follows DashScope pattern)frontend/app/[locale]/models/components/model/ModelAddDialog.tsx— Add MiniMax to provider dropdownfrontend/const/modelConfig.ts— Provider constants (icon, hint, link)frontend/public/locales/{en,zh}/common.json— i18n translationsfrontend/public/minimax.png— Provider iconTests (1 file):
test/backend/services/providers/test_minimax_provider.py— Unit tests covering all model types, known context windows (M3 / M2.7 / M2.7-highspeed), error handling, authorization header, and mixed type classificationWhy
MiniMax-M3 is the latest model, with a 512K context window, up to 128K output, and image input support. M2.7 is retained as a back-compatibility alternative; older M2.5 entries have been removed.
Test Plan